@extends('admin.layouts.wap')
@section('title', '申请小程序备案')

@section('content')
<meta name="csrf-token" content="{{ csrf_token() }}">
<script type="text/javascript" src="/assets/admin/js/dev/template_beian_setting.98834a.js?v={{ time() }}"></script>

<div class="main-back">
    <div class="col-md-12">
        <form id="comment-form" method="POST" action="{{ URL::current() }}" enctype="multipart/form-data">
            <div class="card">
                <div class="card-body">
                    <div id="beian_1">
                        <div class="m-form-item beian_1">
                            <label><b>*</b>选择小程序:</label>
                            <div class="m-col-12  m-xs-12">
                                <select class="m-select" id="appid">
                                    @foreach($minappLists as $minappList)
                                    <option value="{{ $minappList->appid }}">{{ $minappList->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="m-btn-group m-gap-2 m-mt-2 beian_1">
                            <input type="hidden" name="VerifyTask" value="">
                            <div class="m-btn m-btn-primary" id="verify-task" onclick="createIcpVerifyTask();">发起人脸核身</div>
                        </div>

                        <div class="m-form-item beian_2" style="display: none;">
                            <label><b>*</b>选择企业备案信息模版:</label>
                            <div class="m-col-12 m-xs-12">
                                <select class="m-select" id="corp_id">
                                    @foreach($templateBeians as $index => $templateBeian)
                                    <option value="{{ $templateBeian->id }}" data="{{$templateBeian->legal_person}}" district="{{ $templateBeian->province }}" @if($index==0) selected @endif>{{ $templateBeian->remark }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="m-form-item beian_2" style="display: none;">
                            <label><b>*</b>选择管理员模版:</label>
                            <div class="m-col-12  m-xs-12">
                                <select class="m-select" id="admin_id">
                                    @foreach($templateAdmins as $index => $templateAdmin)
                                    <option value="{{ $templateAdmin->id }}" data="{{$templateAdmin->manage_name}}" @if($index==0) selected @endif>{{ $templateAdmin->manage_name }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="m-form-item" style="display: none;" id="shouquan-show">
                            <input type="hidden" id="admin_shouquan" value="1">
                            <label><b>*</b>小程序负责人授权书:<a id="need_authorization_letter_a" class="ms-3" href="https://res.wx.qq.com/op_res/J5VuWMeQKwSdEGsmKtv6_rC_i3uwrQeXisjEvPgWbFxgqcy9VyXaX8VAMAK_yc_AmysziG4y7dNL7ktFisWQJQ" target="_blank" rel="noopener noreferrer">下载模版<span></span></a></label>
                            <div>
                                <a href="javascript:;" class="m-file" style="float:left;margin-left: 0px;">
                                    <font>上传</font>
                                    <input type="file" name="upload_license" id="upload_license" onchange="beianUpload('license',500,true,{},'all')">
                                </a>
                                <img src="" class="m-file-image" id="license_show" style="max-width: 300px;">
                            </div>
                        </div>
                        <div class="m-form-item beian_2" style="display: none;">
                            <label>小程序其它附件:(湖北省小程序电子商务情况说明书)</label>
                            <div>
                                <a href="javascript:;" class="m-file" style="float:left;margin-left: 0px;">
                                    <font>上传</font>
                                    <input type="file" name="upload_applets_other_materials" id="upload_applets_other_materials" onchange="beianUpload('applets_other_materials',500,true,{},'all')">
                                </a>
                                <img src="" class="m-file-image" id="applets_other_materials_show" style="max-width: 300px;">
                            </div>
                        </div>
                        <div class="m-form-item beian_2" style="display: none;">
                            <label><b>*</b>小程序经营内容:<font>字数限制20-200字</font></label>
                            <div class="m-col-12  m-xs-12">
                                <textarea id="comment" class="m-textarea" placeholder="请具体描述小程序实际经营内容、主要服务内容,字数限制20-200字" style="box-sizing: border-box;"></textarea>
                            </div>
                        </div>
                        <div class="m-btn-group m-gap-2 m-mt-2 beian_2" style="display: none;">
                            <div class="m-btn m-btn-primary" onclick="submitBeian();">立即开始备案</div>
                        </div>
                    </div>
                    <div class="m-info-item">
                        <label>温馨提示：</label>
                        <div class="text">
                            <ul>
                                <li>小程序备案提交后不支持撤回修改，请务必确认信息正确。</li>
                                <li>小程序备案通过后系统会主动删除所有企业/个人资料,我司不会将资料用于其他用途。</li>
                                <li>小程序备案提交后腾讯有可能会拨打小程序负责人电话核实，请注意接听。</li>
                                <li>小程序初审通过后，去工信部后台校验工信部下发的短信，请务必24小时内校验。</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    var shqshUrl = '';
    var applets_other_materials_url = '';
    getComment();
    function jsUploadCallBack(id,imageurl,imageName,updata,other) {
        if (id == 'license') {
            shqshUrl = imageurl;
        }else if (id == 'applets_other_materials') {
            applets_other_materials_url = imageurl;
        }
    }
</script>
<script type="text/javascript" src="/assets/admin/js/dev/image.upload.875451.js?v={{ time() }}"></script>
<script src="https://file.wailian1.cn/admin/assets/admin/js/libs/image-conversion/conversion.js"></script>


@endsection
